#pragma once

#include "workspace/IMainFrame.h"

class MainFrame :public IMainFrame
{
	typedef std::map<uint32,sys::ObjectPtr> FormDictionary;

public:
	BEGIN_DEFINE_CLASS(CLSID_MainFrame)
		DEFINE_INTERFACE_ENTRY(IMainFrame)
	END_DEFINE_CLASS()

public:
	MainFrame();
	virtual ~MainFrame();

public:
	virtual IControlBars* GetControlBars() const;
	virtual IMenuBar* GetMenuBar() const;
	virtual IToolBar* GetToolbox() const;
	virtual IPanes* GetPanes() const;
	virtual IForm* CreateForm(uint32 category);
	virtual bool RouteCommandMessenge(SystemEventArgs* e);

private:
	mutable sys::ObjectPtr m_objControlBars;
	mutable sys::ObjectPtr m_objPanes;
	FormDictionary m_forms;
};
AUTO_REGISTER_CLASSMAP_ENTRY(MainFrame)